package com.qk.management.mapper;

import com.qk.entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {


@Delete("delete from role where id=#{id}")
    void deleteById(Integer id);

    void insert(Role role);

    @Select("select * from role where id=#{id}")
    Role getbyId(Integer id);

    void update(Role role);



    @Select("select * from role")
    List<Role> selectAll();

    List<Role> selectByPage(String name, String label);

    @Select("select * from role where id=#{roleId}")
    Role selectById(Integer roleId);
    @Select("select * from role where label = #{roleLabel}")
    Role selectByLabel(String roleLabel);
}
